<?php
	class UsaSearch{
	
		public $size='10';

		private $USA_API_PATH='http://api.usa.gov/jobs/search.json';
	
		private static $LAT_LON_PARAM='lat_lon';
	
		private static $QUERY_PARAM='query';
	
		private static $ORGANIZATION_ID_PARAM='organization_id';
	
		private static $HL_PARAM='hl';
	
		private static $SIZE_PARAM='size';
		
		private static $FROM_PARAM='from';
		
		private static TAGS_PARAM='tags';

		private static $CURL_OPTIONS=array(CURLOPT_HEADER=>false,CURLOPT_RETURNTRANSFER=>true);
		
		
		public function __construct(){
			
		}
		
		public function setSize($size){
			$this->size=$size;
		}
		
		public function execute($params){
			if($params!=null && is_array($params) && count($params)>0){
				$ch = curl_init($this->USA_API_PATH);
				$CURL_OPTIONS[CURLOPT_POSTFIELDS]=$params;
				curl_setopt_array($ch,$CURL_OPTIONS);		
				$response = json_decode(curl_exec($ch));
				return $this->parser($response);
			}else{
				//log some error
			}
			
		}
		
		private function parser($unparse){
			// now we need to parse the data into what worktive needs
			if($unparse!=null && is_array($unparse) && count($unparse)>0){
				
			}
		}
	
	
	}
?>